package com.kintreda.ieco_server.bean.system;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

/***
 * 区域表
 * @see 民政部行政区划变更 http://www.mca.gov.cn/article/sj/xzqh/2018/
 * @see 统计局2017行政区划数据 http://www.stats.gov.cn/tjsj/tjbz/tjyqhdmhcxhfdm/2017/
 */
@Entity
@Table(name="area")
public class Area implements Serializable{
	
	private static final long serialVersionUID = 1L;
	
	private Integer id;
	private String name;//行政区划名称
	private String code;//行政区划编码
	private String subCode;//行政区划城乡分类代码 100 城镇 110 -城区 111 --主城区 112 --城乡结合区 120 -镇区 121 --镇中心区 122 --镇乡结合区 123 --特殊区域 200 乡村 210 -乡中心区 220 -村庄
	private Integer pid;//父节点id
	private Integer level;//1省2市3县4乡镇街道5村委会
	private Integer status;//0 禁用 1正常
	/******************临时变量*******************/
	@Transient
	private Integer projectSize;//每个区所占的项目数量
	@Transient
	private Integer projectHandlerAuditYes;//每个区所占的项目完成的项目数量
	//存储月份
	@Transient
	private String months;

	/**
	 * 区域编码
	 */
	private String areaCode;

	@Id
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    @Column(name = "id")
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public Integer getProjectHandlerAuditYes() {
		return projectHandlerAuditYes;
	}
	public void setProjectHandlerAuditYes(Integer projectHandlerAuditYes) {
		this.projectHandlerAuditYes = projectHandlerAuditYes;
	}
	
	public String getMonths() {
		return months;
	}
	public void setMonths(String months) {
		this.months = months;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getSubCode() {
		return subCode;
	}
	public void setSubCode(String subCode) {
		this.subCode = subCode;
	}
	public Integer getPid() {
		return pid;
	}
	public void setPid(Integer pid) {
		this.pid = pid;
	}
	public Integer getLevel() {
		return level;
	}
	public void setLevel(Integer level) {
		this.level = level;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	public Integer getProjectSize() {
		return projectSize;
	}
	public void setProjectSize(Integer projectSize) {
		this.projectSize = projectSize;
	}

	public String getAreaCode() {
		return areaCode;
	}

	public void setAreaCode(String areaCode) {
		this.areaCode = areaCode;
	}
}